import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

//@ts-ignore忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//svg插件需要的配置代码
import 'virtual:svg-icons-register'
//引入自定义插件对象：注册整个项目全局组件
import globalComponent from './components/index'
import SvgIcon from './components/SvgIcon/index.vue'
import './styles/index.scss'
//引入路由
import router from './router'
import pinia from './store'
// 引入路由鉴权文件
import './permission'
//获取应用实例对象
const app = createApp(App)
//安装element-plus
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(globalComponent)
//注册模板路由
app.use(router)
//安装仓库pinia
app.use(pinia)
//将应用挂载到挂载点上
app.mount('#app')
